
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>编译选项 · TypeScript Handbook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Patrick Zhong">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Configuring Watch.html" />
    
    
    <link rel="prev" href="Typings for NPM Packages.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="tutorials/">
            
                <a href="tutorials/">
            
                    
                    快速上手
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="tutorials/TypeScript in 5 minutes.html">
            
                <a href="tutorials/TypeScript in 5 minutes.html">
            
                    
                    5分钟了解TypeScript
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="tutorials/ASP.NET Core.html">
            
                <a href="tutorials/ASP.NET Core.html">
            
                    
                    ASP.NET Core
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="tutorials/ASP.NET 4.html">
            
                <a href="tutorials/ASP.NET 4.html">
            
                    
                    ASP.NET 4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="tutorials/Gulp.html">
            
                <a href="tutorials/Gulp.html">
            
                    
                    Gulp
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="tutorials/Knockout.html">
            
                <a href="tutorials/Knockout.html">
            
                    
                    Knockout.js
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.6" data-path="tutorials/React & Webpack.html">
            
                <a href="tutorials/React & Webpack.html">
            
                    
                    React与webpack
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.7" data-path="tutorials/React.html">
            
                <a href="tutorials/React.html">
            
                    
                    React
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.8" data-path="tutorials/Angular 2.html">
            
                <a href="tutorials/Angular 2.html">
            
                    
                    Angular 2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.9" data-path="tutorials/Migrating from JavaScript.html">
            
                <a href="tutorials/Migrating from JavaScript.html">
            
                    
                    从JavaScript迁移到TypeScript
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="./">
            
                <a href="./">
            
                    
                    手册
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="Basic Types.html">
            
                <a href="Basic Types.html">
            
                    
                    基础类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="Variable Declarations.html">
            
                <a href="Variable Declarations.html">
            
                    
                    变量声明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="Interfaces.html">
            
                <a href="Interfaces.html">
            
                    
                    接口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="Classes.html">
            
                <a href="Classes.html">
            
                    
                    类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="Functions.html">
            
                <a href="Functions.html">
            
                    
                    函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="Generics.html">
            
                <a href="Generics.html">
            
                    
                    泛型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="Enums.html">
            
                <a href="Enums.html">
            
                    
                    枚举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="Type Inference.html">
            
                <a href="Type Inference.html">
            
                    
                    类型推论
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="Type Compatibility.html">
            
                <a href="Type Compatibility.html">
            
                    
                    类型兼容性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.10" data-path="Advanced Types.html">
            
                <a href="Advanced Types.html">
            
                    
                    高级类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.11" data-path="Utilit Types.md">
            
                <span>
            
                    
                    实用工具类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.12" data-path="Symbols.html">
            
                <a href="Symbols.html">
            
                    
                    Symbols
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.13" data-path="Iterators and Generators.html">
            
                <a href="Iterators and Generators.html">
            
                    
                    Iterators 和 Generators
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.14" data-path="Modules.html">
            
                <a href="Modules.html">
            
                    
                    模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.15" data-path="Namespaces.html">
            
                <a href="Namespaces.html">
            
                    
                    命名空间
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.16" data-path="Namespaces and Modules.html">
            
                <a href="Namespaces and Modules.html">
            
                    
                    命名空间和模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.17" data-path="Module Resolution.html">
            
                <a href="Module Resolution.html">
            
                    
                    模块解析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.18" data-path="Declaration Merging.html">
            
                <a href="Declaration Merging.html">
            
                    
                    声明合并
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.19" data-path="Writing Definition Files.html">
            
                <a href="Writing Definition Files.html">
            
                    
                    书写.d.ts文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.20" data-path="JSX.html">
            
                <a href="JSX.html">
            
                    
                    JSX
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.21" data-path="Decorators.html">
            
                <a href="Decorators.html">
            
                    
                    Decorators
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.22" data-path="Mixins.html">
            
                <a href="Mixins.html">
            
                    
                    混入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.23" data-path="Triple-Slash Directives.html">
            
                <a href="Triple-Slash Directives.html">
            
                    
                    三斜线指令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.24" data-path="Type Checking JavaScript Files.html">
            
                <a href="Type Checking JavaScript Files.html">
            
                    
                    JavaScript文件里的类型检查
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="declaration files/Introduction.html">
            
                <a href="declaration files/Introduction.html">
            
                    
                    如何书写声明文件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="declaration files/Library Structures.html">
            
                <a href="declaration files/Library Structures.html">
            
                    
                    结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="declaration files/Do's and Don'ts.html">
            
                <a href="declaration files/Do's and Don'ts.html">
            
                    
                    规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="declaration files/By Example.html">
            
                <a href="declaration files/By Example.html">
            
                    
                    举例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="declaration files/Deep Dive.html">
            
                <a href="declaration files/Deep Dive.html">
            
                    
                    深入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="declaration files/Publishing.html">
            
                <a href="declaration files/Publishing.html">
            
                    
                    发布
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="declaration files/Consumption.html">
            
                <a href="declaration files/Consumption.html">
            
                    
                    使用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="tsconfig.json.html">
            
                <a href="tsconfig.json.html">
            
                    
                    工程配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="tsconfig.json.html">
            
                <a href="tsconfig.json.html">
            
                    
                    tsconfig.json
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="Project References.html">
            
                <a href="Project References.html">
            
                    
                    工程引用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="Typings for NPM Packages.html">
            
                <a href="Typings for NPM Packages.html">
            
                    
                    NPM包的类型
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5.4" data-path="Compiler Options.html">
            
                <a href="Compiler Options.html">
            
                    
                    编译选项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="Configuring Watch.html">
            
                <a href="Configuring Watch.html">
            
                    
                    配置 Watch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="Compiler Options in MSBuild.html">
            
                <a href="Compiler Options in MSBuild.html">
            
                    
                    在MSBuild里使用编译选项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="Integrating with Build Tools.html">
            
                <a href="Integrating with Build Tools.html">
            
                    
                    与其它构建工具整合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="Nightly Builds.html">
            
                <a href="Nightly Builds.html">
            
                    
                    使用TypeScript的每日构建版本
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../wiki/">
            
                <a href="../wiki/">
            
                    
                    Wiki
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../wiki/this-in-TypeScript.html">
            
                <a href="../wiki/this-in-TypeScript.html">
            
                    
                    TypeScript里的this
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../wiki/coding_guidelines.html">
            
                <a href="../wiki/coding_guidelines.html">
            
                    
                    编码规范
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../wiki/Common Errors.html">
            
                <a href="../wiki/Common Errors.html">
            
                    
                    常见编译错误
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../wiki/TypeScript-Editor-Support.html">
            
                <a href="../wiki/TypeScript-Editor-Support.html">
            
                    
                    支持TypeScript的编辑器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../wiki/Using-TypeScript-With-ASP.NET-5.html">
            
                <a href="../wiki/Using-TypeScript-With-ASP.NET-5.html">
            
                    
                    结合ASP.NET v5使用TypeScript
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../wiki/Architectural-Overview.html">
            
                <a href="../wiki/Architectural-Overview.html">
            
                    
                    架构概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../wiki/Roadmap.html">
            
                <a href="../wiki/Roadmap.html">
            
                    
                    发展路线图
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../release-notes/">
            
                <a href="../release-notes/">
            
                    
                    新增功能
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../release-notes/TypeScript 3.1.html">
            
                <a href="../release-notes/TypeScript 3.1.html">
            
                    
                    TypeScript 3.1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../release-notes/TypeScript 3.0.html">
            
                <a href="../release-notes/TypeScript 3.0.html">
            
                    
                    TypeScript 3.0
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../release-notes/TypeScript 2.9.html">
            
                <a href="../release-notes/TypeScript 2.9.html">
            
                    
                    TypeScript 2.9
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="../release-notes/TypeScript 2.8.html">
            
                <a href="../release-notes/TypeScript 2.8.html">
            
                    
                    TypeScript 2.8
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="../release-notes/TypeScript 2.7.html">
            
                <a href="../release-notes/TypeScript 2.7.html">
            
                    
                    TypeScript 2.7
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="../release-notes/TypeScript 2.6.html">
            
                <a href="../release-notes/TypeScript 2.6.html">
            
                    
                    TypeScript 2.6
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="../release-notes/TypeScript 2.5.html">
            
                <a href="../release-notes/TypeScript 2.5.html">
            
                    
                    TypeScript 2.5
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.8" data-path="../release-notes/TypeScript 2.4.html">
            
                <a href="../release-notes/TypeScript 2.4.html">
            
                    
                    TypeScript 2.4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.9" data-path="../release-notes/TypeScript 2.3.html">
            
                <a href="../release-notes/TypeScript 2.3.html">
            
                    
                    TypeScript 2.3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.10" data-path="../release-notes/TypeScript 2.2.html">
            
                <a href="../release-notes/TypeScript 2.2.html">
            
                    
                    TypeScript 2.2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.11" data-path="../release-notes/TypeScript 2.1.html">
            
                <a href="../release-notes/TypeScript 2.1.html">
            
                    
                    TypeScript 2.1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.12" data-path="../release-notes/TypeScript 2.0.html">
            
                <a href="../release-notes/TypeScript 2.0.html">
            
                    
                    TypeScript 2.0
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.13" data-path="../release-notes/TypeScript 1.8.html">
            
                <a href="../release-notes/TypeScript 1.8.html">
            
                    
                    TypeScript 1.8
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.14" data-path="../release-notes/TypeScript 1.7.html">
            
                <a href="../release-notes/TypeScript 1.7.html">
            
                    
                    TypeScript 1.7
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.15" data-path="../release-notes/TypeScript 1.6.html">
            
                <a href="../release-notes/TypeScript 1.6.html">
            
                    
                    TypeScript 1.6
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.16" data-path="../release-notes/TypeScript 1.5.html">
            
                <a href="../release-notes/TypeScript 1.5.html">
            
                    
                    TypeScript 1.5
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.17" data-path="../release-notes/TypeScript 1.4.html">
            
                <a href="../release-notes/TypeScript 1.4.html">
            
                    
                    TypeScript 1.4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.18" data-path="../release-notes/TypeScript 1.3.html">
            
                <a href="../release-notes/TypeScript 1.3.html">
            
                    
                    TypeScript 1.3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.19" data-path="../release-notes/TypeScript 1.1.html">
            
                <a href="../release-notes/TypeScript 1.1.html">
            
                    
                    TypeScript 1.1
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../breaking-changes/breaking-changes.html">
            
                <a href="../breaking-changes/breaking-changes.html">
            
                    
                    Breaking Changes
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../breaking-changes/TypeScript 2.4.html">
            
                <a href="../breaking-changes/TypeScript 2.4.html">
            
                    
                    TypeScript 2.4
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../breaking-changes/TypeScript 2.3.html">
            
                <a href="../breaking-changes/TypeScript 2.3.html">
            
                    
                    TypeScript 2.3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../breaking-changes/TypeScript 2.2.html">
            
                <a href="../breaking-changes/TypeScript 2.2.html">
            
                    
                    TypeScript 2.2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.4" data-path="../breaking-changes/TypeScript 2.1.html">
            
                <a href="../breaking-changes/TypeScript 2.1.html">
            
                    
                    TypeScript 2.1
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.5" data-path="../breaking-changes/TypeScript 2.0.html">
            
                <a href="../breaking-changes/TypeScript 2.0.html">
            
                    
                    TypeScript 2.0
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.6" data-path="../breaking-changes/TypeScript 1.8.html">
            
                <a href="../breaking-changes/TypeScript 1.8.html">
            
                    
                    TypeScript 1.8
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.7" data-path="../breaking-changes/TypeScript 1.7.html">
            
                <a href="../breaking-changes/TypeScript 1.7.html">
            
                    
                    TypeScript 1.7
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.8" data-path="../breaking-changes/TypeScript 1.6.html">
            
                <a href="../breaking-changes/TypeScript 1.6.html">
            
                    
                    TypeScript 1.6
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.9" data-path="../breaking-changes/TypeScript 1.5.html">
            
                <a href="../breaking-changes/TypeScript 1.5.html">
            
                    
                    TypeScript 1.5
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.10" data-path="../breaking-changes/TypeScript 1.4.html">
            
                <a href="../breaking-changes/TypeScript 1.4.html">
            
                    
                    TypeScript 1.4
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >编译选项</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x7F16;&#x8BD1;&#x9009;&#x9879;">&#x7F16;&#x8BD1;&#x9009;&#x9879;</h2>
<table>
<thead>
<tr>
<th>&#x9009;&#x9879;</th>
<th>&#x7C7B;&#x578B;</th>
<th>&#x9ED8;&#x8BA4;&#x503C;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>--allowJs</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5141;&#x8BB8;&#x7F16;&#x8BD1;javascript&#x6587;&#x4EF6;&#x3002;</td>
</tr>
<tr>
<td><code>--allowSyntheticDefaultImports</code></td>
<td><code>boolean</code></td>
<td><code>module === &quot;system&quot;</code>&#x6216;&#x8BBE;&#x7F6E;&#x4E86;<code>--esModuleInterop</code>&#x4E14;<code>module</code>&#x4E0D;&#x4E3A;<code>es2015</code>/<code>esnext</code></td>
<td>&#x5141;&#x8BB8;&#x4ECE;&#x6CA1;&#x6709;&#x8BBE;&#x7F6E;&#x9ED8;&#x8BA4;&#x5BFC;&#x51FA;&#x7684;&#x6A21;&#x5757;&#x4E2D;&#x9ED8;&#x8BA4;&#x5BFC;&#x5165;&#x3002;&#x8FD9;&#x5E76;&#x4E0D;&#x5F71;&#x54CD;&#x4EE3;&#x7801;&#x7684;&#x8F93;&#x51FA;&#xFF0C;&#x4EC5;&#x4E3A;&#x4E86;&#x7C7B;&#x578B;&#x68C0;&#x67E5;&#x3002;</td>
</tr>
<tr>
<td><code>--allowUnreachableCode</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x62A5;&#x544A;&#x6267;&#x884C;&#x4E0D;&#x5230;&#x7684;&#x4EE3;&#x7801;&#x9519;&#x8BEF;&#x3002;</td>
</tr>
<tr>
<td><code>--allowUnusedLabels</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x62A5;&#x544A;&#x672A;&#x4F7F;&#x7528;&#x7684;&#x6807;&#x7B7E;&#x9519;&#x8BEF;&#x3002;</td>
</tr>
<tr>
<td><code>--alwaysStrict</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4EE5;&#x4E25;&#x683C;&#x6A21;&#x5F0F;&#x89E3;&#x6790;&#x5E76;&#x4E3A;&#x6BCF;&#x4E2A;&#x6E90;&#x6587;&#x4EF6;&#x751F;&#x6210;<code>&quot;use strict&quot;</code>&#x8BED;&#x53E5;</td>
</tr>
<tr>
<td><code>--baseUrl</code></td>
<td><code>string</code></td>
<td></td>
<td>&#x89E3;&#x6790;&#x975E;&#x76F8;&#x5BF9;&#x6A21;&#x5757;&#x540D;&#x7684;&#x57FA;&#x51C6;&#x76EE;&#x5F55;&#x3002;&#x67E5;&#x770B;<a href="Module%20Resolution.md#base-url">&#x6A21;&#x5757;&#x89E3;&#x6790;&#x6587;&#x6863;</a>&#x4E86;&#x89E3;&#x8BE6;&#x60C5;&#x3002;</td>
</tr>
<tr>
<td><code>--charset</code></td>
<td><code>string</code></td>
<td><code>&quot;utf8&quot;</code></td>
<td>&#x8F93;&#x5165;&#x6587;&#x4EF6;&#x7684;&#x5B57;&#x7B26;&#x96C6;&#x3002;</td>
</tr>
<tr>
<td><code>--checkJs</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5728;.js&#x6587;&#x4EF6;&#x4E2D;&#x62A5;&#x544A;&#x9519;&#x8BEF;&#x3002;&#x4E0E;<code>--allowJs</code>&#x914D;&#x5408;&#x4F7F;&#x7528;&#x3002;</td>
</tr>
<tr>
<td><code>--declaration</code><br><code>-d</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x751F;&#x6210;&#x76F8;&#x5E94;&#x7684;<code>.d.ts</code>&#x6587;&#x4EF6;&#x3002;</td>
</tr>
<tr>
<td><code>--declarationDir</code></td>
<td><code>string</code></td>
<td></td>
<td>&#x751F;&#x6210;&#x58F0;&#x660E;&#x6587;&#x4EF6;&#x7684;&#x8F93;&#x51FA;&#x8DEF;&#x5F84;&#x3002;</td>
</tr>
<tr>
<td><code>--diagnostics</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x663E;&#x793A;&#x8BCA;&#x65AD;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--disableSizeLimit</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x7981;&#x7528;JavaScript&#x5DE5;&#x7A0B;&#x4F53;&#x79EF;&#x5927;&#x5C0F;&#x7684;&#x9650;&#x5236;</td>
</tr>
<tr>
<td><code>--emitBOM</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5728;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x7684;&#x5F00;&#x5934;&#x52A0;&#x5165;BOM&#x5934;&#xFF08;UTF-8 Byte Order Mark&#xFF09;&#x3002;</td>
</tr>
<tr>
<td><code>--emitDecoratorMetadata</code><sup>[1]</sup></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x7ED9;&#x6E90;&#x7801;&#x91CC;&#x7684;&#x88C5;&#x9970;&#x5668;&#x58F0;&#x660E;&#x52A0;&#x4E0A;&#x8BBE;&#x8BA1;&#x7C7B;&#x578B;&#x5143;&#x6570;&#x636E;&#x3002;&#x67E5;&#x770B;<a href="https://github.com/Microsoft/TypeScript/issues/2577" target="_blank">issue #2577</a>&#x4E86;&#x89E3;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--experimentalDecorators</code><sup>[1]</sup></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x542F;&#x7528;&#x5B9E;&#x9A8C;&#x6027;&#x7684;ES&#x88C5;&#x9970;&#x5668;&#x3002;</td>
</tr>
<tr>
<td><code>--extendedDiagnostics</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x663E;&#x793A;&#x8BE6;&#x7EC6;&#x7684;&#x8BCA;&#x6BB5;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--forceConsistentCasingInFileNames</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x7981;&#x6B62;&#x5BF9;&#x540C;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x7684;&#x4E0D;&#x4E00;&#x81F4;&#x7684;&#x5F15;&#x7528;&#x3002;</td>
</tr>
<tr>
<td><code>--help</code><br><code>-h</code></td>
<td></td>
<td></td>
<td>&#x6253;&#x5370;&#x5E2E;&#x52A9;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--importHelpers</code></td>
<td><code>string</code></td>
<td></td>
<td>&#x4ECE;<a href="https://www.npmjs.com/package/tslib" target="_blank"><code>tslib</code></a>&#x5BFC;&#x5165;&#x8F85;&#x52A9;&#x5DE5;&#x5177;&#x51FD;&#x6570;&#xFF08;&#x6BD4;&#x5982;<code>__extends</code>&#xFF0C;<code>__rest</code>&#x7B49;&#xFF09;</td>
</tr>
<tr>
<td><code>--inlineSourceMap</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x751F;&#x6210;&#x5355;&#x4E2A;sourcemaps&#x6587;&#x4EF6;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x5C06;&#x6BCF;sourcemaps&#x751F;&#x6210;&#x4E0D;&#x540C;&#x7684;&#x6587;&#x4EF6;&#x3002;</td>
</tr>
<tr>
<td><code>--inlineSources</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5C06;&#x4EE3;&#x7801;&#x4E0E;sourcemaps&#x751F;&#x6210;&#x5230;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x4E2D;&#xFF0C;&#x8981;&#x6C42;&#x540C;&#x65F6;&#x8BBE;&#x7F6E;&#x4E86;<code>--inlineSourceMap</code>&#x6216;<code>--sourceMap</code>&#x5C5E;&#x6027;&#x3002;</td>
</tr>
<tr>
<td><code>--init</code></td>
<td></td>
<td></td>
<td>&#x521D;&#x59CB;&#x5316;TypeScript&#x9879;&#x76EE;&#x5E76;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;<code>tsconfig.json</code>&#x6587;&#x4EF6;&#x3002;</td>
</tr>
<tr>
<td><code>--isolatedModules</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5C06;&#x6BCF;&#x4E2A;&#x6587;&#x4EF6;&#x4F5C;&#x4E3A;&#x5355;&#x72EC;&#x7684;&#x6A21;&#x5757;&#xFF08;&#x4E0E;&#x201C;ts.transpileModule&#x201D;&#x7C7B;&#x4F3C;&#xFF09;&#x3002;</td>
</tr>
<tr>
<td><code>--jsx</code></td>
<td><code>string</code></td>
<td><code>&quot;Preserve&quot;</code></td>
<td>&#x5728;<code>.tsx</code>&#x6587;&#x4EF6;&#x91CC;&#x652F;&#x6301;JSX&#xFF1A;<code>&quot;React&quot;</code>&#x6216;<code>&quot;Preserve&quot;</code>&#x3002;&#x67E5;&#x770B;<a href="JSX.html">JSX</a>&#x3002;</td>
</tr>
<tr>
<td><code>--jsxFactory</code></td>
<td><code>string</code></td>
<td><code>&quot;React.createElement&quot;</code></td>
<td>&#x6307;&#x5B9A;&#x751F;&#x6210;&#x76EE;&#x6807;&#x4E3A;react JSX&#x65F6;&#xFF0C;&#x4F7F;&#x7528;&#x7684;JSX&#x5DE5;&#x5382;&#x51FD;&#x6570;&#xFF0C;&#x6BD4;&#x5982;<code>React.createElement</code>&#x6216;<code>h</code>&#x3002;</td>
</tr>
<tr>
<td><code>--lib</code></td>
<td><code>string[]</code></td>
<td></td>
<td>&#x7F16;&#x8BD1;&#x8FC7;&#x7A0B;&#x4E2D;&#x9700;&#x8981;&#x5F15;&#x5165;&#x7684;&#x5E93;&#x6587;&#x4EF6;&#x7684;&#x5217;&#x8868;&#x3002;<br>&#x53EF;&#x80FD;&#x7684;&#x503C;&#x4E3A;&#xFF1A;  <br>&#x25BA; <code>ES5</code> <br>&#x25BA; <code>ES6</code> <br>&#x25BA; <code>ES2015</code> <br>&#x25BA; <code>ES7</code> <br>&#x25BA; <code>ES2016</code> <br>&#x25BA; <code>ES2017</code>  <br>&#x25BA; <code>ES2018</code> <br>&#x25BA; <code>ESNext</code> <br>&#x25BA; <code>DOM</code> <br>&#x25BA; <code>DOM.Iterable</code> <br>&#x25BA; <code>WebWorker</code> <br>&#x25BA; <code>ScriptHost</code> <br>&#x25BA; <code>ES2015.Core</code> <br>&#x25BA; <code>ES2015.Collection</code> <br>&#x25BA; <code>ES2015.Generator</code> <br>&#x25BA; <code>ES2015.Iterable</code> <br>&#x25BA; <code>ES2015.Promise</code> <br>&#x25BA; <code>ES2015.Proxy</code> <br>&#x25BA; <code>ES2015.Reflect</code> <br>&#x25BA; <code>ES2015.Symbol</code> <br>&#x25BA; <code>ES2015.Symbol.WellKnown</code> <br>&#x25BA; <code>ES2016.Array.Include</code> <br>&#x25BA; <code>ES2017.object</code> <br>&#x25BA; <code>ES2017.Intl</code> <br>&#x25BA; <code>ES2017.SharedMemory</code> <br>&#x25BA; <code>ES2017.String</code> <br>&#x25BA; <code>ES2017.TypedArrays</code> <br>&#x25BA; <code>ES2018.Intl</code> <br>&#x25BA; <code>ES2018.Promise</code> <br>&#x25BA; <code>ES2018.RegExp</code> <br>&#x25BA; <code>ESNext.AsyncIterable</code> <br>&#x25BA; <code>ESNext.Array</code> <br>&#x25BA; <code>ESNext.Intl</code> <br>&#x25BA; <code>ESNext.Symbol</code> <br><br> &#x6CE8;&#x610F;&#xFF1A;&#x5982;&#x679C;<code>--lib</code>&#x6CA1;&#x6709;&#x6307;&#x5B9A;&#x9ED8;&#x8BA4;&#x6CE8;&#x5165;&#x7684;&#x5E93;&#x7684;&#x5217;&#x8868;&#x3002;&#x9ED8;&#x8BA4;&#x6CE8;&#x5165;&#x7684;&#x5E93;&#x4E3A;&#xFF1A;<br> &#x25BA; &#x9488;&#x5BF9;&#x4E8E;<code>--target ES5</code>&#xFF1A;<code>DOM&#xFF0C;ES5&#xFF0C;ScriptHost</code><br>  &#x25BA; &#x9488;&#x5BF9;&#x4E8E;<code>--target ES6</code>&#xFF1A;<code>DOM&#xFF0C;ES6&#xFF0C;DOM.Iterable&#xFF0C;ScriptHost</code></td>
</tr>
<tr>
<td><code>--listEmittedFiles</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x6253;&#x5370;&#x51FA;&#x7F16;&#x8BD1;&#x540E;&#x751F;&#x6210;&#x6587;&#x4EF6;&#x7684;&#x540D;&#x5B57;&#x3002;</td>
</tr>
<tr>
<td><code>--listFiles</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x7F16;&#x8BD1;&#x8FC7;&#x7A0B;&#x4E2D;&#x6253;&#x5370;&#x6587;&#x4EF6;&#x540D;&#x3002;</td>
</tr>
<tr>
<td><code>--locale</code></td>
<td><code>string</code></td>
<td><em>(platform specific)</em></td>
<td>&#x663E;&#x793A;&#x9519;&#x8BEF;&#x4FE1;&#x606F;&#x65F6;&#x4F7F;&#x7528;&#x7684;&#x8BED;&#x8A00;&#xFF0C;&#x6BD4;&#x5982;&#xFF1A;en-us&#x3002;</td>
</tr>
<tr>
<td><code>--mapRoot</code></td>
<td><code>string</code></td>
<td></td>
<td>&#x4E3A;&#x8C03;&#x8BD5;&#x5668;&#x6307;&#x5B9A;&#x6307;&#x5B9A;sourcemap&#x6587;&#x4EF6;&#x7684;&#x8DEF;&#x5F84;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x4F7F;&#x7528;&#x751F;&#x6210;&#x65F6;&#x7684;&#x8DEF;&#x5F84;&#x3002;&#x5F53;<code>.map</code>&#x6587;&#x4EF6;&#x662F;&#x5728;&#x8FD0;&#x884C;&#x65F6;&#x6307;&#x5B9A;&#x7684;&#xFF0C;&#x5E76;&#x4E0D;&#x540C;&#x4E8E;<code>js</code>&#x6587;&#x4EF6;&#x7684;&#x5730;&#x5740;&#x65F6;&#x4F7F;&#x7528;&#x8FD9;&#x4E2A;&#x6807;&#x8BB0;&#x3002;&#x6307;&#x5B9A;&#x7684;&#x8DEF;&#x5F84;&#x4F1A;&#x5D4C;&#x5165;&#x5230;<code>sourceMap</code>&#x91CC;&#x544A;&#x8BC9;&#x8C03;&#x8BD5;&#x5668;&#x5230;&#x54EA;&#x91CC;&#x53BB;&#x627E;&#x5B83;&#x4EEC;&#x3002;</td>
</tr>
<tr>
<td><code>--maxNodeModuleJsDepth</code></td>
<td><code>number</code></td>
<td><code>0</code></td>
<td>node_modules&#x4F9D;&#x8D56;&#x7684;&#x6700;&#x5927;&#x641C;&#x7D22;&#x6DF1;&#x5EA6;&#x5E76;&#x52A0;&#x8F7D;JavaScript&#x6587;&#x4EF6;&#x3002;&#x4EC5;&#x9002;&#x7528;&#x4E8E;<code>--allowJs</code>&#x3002;</td>
</tr>
<tr>
<td><code>--module</code><br><code>-m</code></td>
<td><code>string</code></td>
<td><code>target === &quot;ES6&quot; ? &quot;ES6&quot; : &quot;commonjs&quot;</code></td>
<td>&#x6307;&#x5B9A;&#x751F;&#x6210;&#x54EA;&#x4E2A;&#x6A21;&#x5757;&#x7CFB;&#x7EDF;&#x4EE3;&#x7801;&#xFF1A;<code>&quot;None&quot;</code>&#xFF0C;<code>&quot;CommonJS&quot;</code>&#xFF0C;<code>&quot;AMD&quot;</code>&#xFF0C;<code>&quot;System&quot;</code>&#xFF0C;<code>&quot;UMD&quot;</code>&#xFF0C;<code>&quot;ES6&quot;</code>&#x6216;<code>&quot;ES2015&quot;</code>&#x3002;<br>&#x25BA; &#x53EA;&#x6709;<code>&quot;AMD&quot;</code>&#x548C;<code>&quot;System&quot;</code>&#x80FD;&#x548C;<code>--outFile</code>&#x4E00;&#x8D77;&#x4F7F;&#x7528;&#x3002;<br>&#x25BA;<code>&quot;ES6&quot;</code>&#x548C;<code>&quot;ES2015&quot;</code>&#x53EF;&#x4F7F;&#x7528;&#x5728;&#x76EE;&#x6807;&#x8F93;&#x51FA;&#x4E3A;<code>&quot;ES5&quot;</code>&#x6216;&#x66F4;&#x4F4E;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x3002;</td>
</tr>
<tr>
<td><code>--moduleResolution</code></td>
<td><code>string</code></td>
<td><code>module === &quot;AMD&quot; or &quot;System&quot; or &quot;ES6&quot; ? &quot;Classic&quot; : &quot;Node&quot;</code></td>
<td>&#x51B3;&#x5B9A;&#x5982;&#x4F55;&#x5904;&#x7406;&#x6A21;&#x5757;&#x3002;&#x6216;&#x8005;&#x662F;<code>&quot;Node&quot;</code>&#x5BF9;&#x4E8E;Node.js/io.js&#xFF0C;&#x6216;&#x8005;&#x662F;<code>&quot;Classic&quot;</code>&#xFF08;&#x9ED8;&#x8BA4;&#xFF09;&#x3002;&#x67E5;&#x770B;<a href="Module%20Resolution.md">&#x6A21;&#x5757;&#x89E3;&#x6790;</a>&#x4E86;&#x89E3;&#x8BE6;&#x60C5;&#x3002;</td>
</tr>
<tr>
<td><code>--newLine</code></td>
<td><code>string</code></td>
<td><em>(platform specific)</em></td>
<td>&#x5F53;&#x751F;&#x6210;&#x6587;&#x4EF6;&#x65F6;&#x6307;&#x5B9A;&#x884C;&#x7ED3;&#x675F;&#x7B26;&#xFF1A;<code>&quot;crlf&quot;</code>&#xFF08;windows&#xFF09;&#x6216;<code>&quot;lf&quot;</code>&#xFF08;unix&#xFF09;&#x3002;</td>
</tr>
<tr>
<td><code>--noEmit</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x751F;&#x6210;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x3002;</td>
</tr>
<tr>
<td><code>--noEmitHelpers</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x5728;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x4E2D;&#x751F;&#x6210;&#x7528;&#x6237;&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x5E2E;&#x52A9;&#x51FD;&#x6570;&#x4EE3;&#x7801;&#xFF0C;&#x5982;<code>__extends</code>&#x3002;</td>
</tr>
<tr>
<td><code>--noEmitOnError</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x62A5;&#x9519;&#x65F6;&#x4E0D;&#x751F;&#x6210;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x3002;</td>
</tr>
<tr>
<td><code>--noErrorTruncation</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x622A;&#x77ED;&#x9519;&#x8BEF;&#x6D88;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--noFallthroughCasesInSwitch</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x62A5;&#x544A;switch&#x8BED;&#x53E5;&#x7684;fallthrough&#x9519;&#x8BEF;&#x3002;&#xFF08;&#x5373;&#xFF0C;&#x4E0D;&#x5141;&#x8BB8;switch&#x7684;case&#x8BED;&#x53E5;&#x8D2F;&#x7A7F;&#xFF09;</td>
</tr>
<tr>
<td><code>--noImplicitAny</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5728;&#x8868;&#x8FBE;&#x5F0F;&#x548C;&#x58F0;&#x660E;&#x4E0A;&#x6709;&#x9690;&#x542B;&#x7684;<code>any</code>&#x7C7B;&#x578B;&#x65F6;&#x62A5;&#x9519;&#x3002;</td>
</tr>
<tr>
<td><code>--noImplicitReturns</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x662F;&#x51FD;&#x6570;&#x7684;&#x6240;&#x6709;&#x8FD4;&#x56DE;&#x8DEF;&#x5F84;&#x90FD;&#x6709;&#x8FD4;&#x56DE;&#x503C;&#x65F6;&#x62A5;&#x9519;&#x3002;</td>
</tr>
<tr>
<td><code>--noImplicitThis</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5F53;<code>this</code>&#x8868;&#x8FBE;&#x5F0F;&#x7684;&#x503C;&#x4E3A;<code>any</code>&#x7C7B;&#x578B;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x9519;&#x8BEF;&#x3002;</td>
</tr>
<tr>
<td><code>--noImplicitUseStrict</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x6A21;&#x5757;&#x8F93;&#x51FA;&#x4E2D;&#x4E0D;&#x5305;&#x542B;<code>&quot;use strict&quot;</code>&#x6307;&#x4EE4;&#x3002;</td>
</tr>
<tr>
<td><code>--noLib</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x5305;&#x542B;&#x9ED8;&#x8BA4;&#x7684;&#x5E93;&#x6587;&#x4EF6;&#xFF08;<code>lib.d.ts</code>&#xFF09;&#x3002;</td>
</tr>
<tr>
<td><code>--noResolve</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x628A;<code>/// &lt;reference``&gt;</code>&#x6216;&#x6A21;&#x5757;&#x5BFC;&#x5165;&#x7684;&#x6587;&#x4EF6;&#x52A0;&#x5230;&#x7F16;&#x8BD1;&#x6587;&#x4EF6;&#x5217;&#x8868;&#x3002;</td>
</tr>
<tr>
<td><code>--noStrictGenericChecks</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x7981;&#x7528;&#x5728;&#x51FD;&#x6570;&#x7C7B;&#x578B;&#x91CC;&#x5BF9;&#x6CDB;&#x578B;&#x7B7E;&#x540D;&#x8FDB;&#x884C;&#x4E25;&#x683C;&#x68C0;&#x67E5;&#x3002;</td>
</tr>
<tr>
<td><code>--noUnusedLocals</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x82E5;&#x6709;&#x672A;&#x4F7F;&#x7528;&#x7684;&#x5C40;&#x90E8;&#x53D8;&#x91CF;&#x5219;&#x629B;&#x9519;&#x3002;</td>
</tr>
<tr>
<td><code>--noUnusedParameters</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x82E5;&#x6709;&#x672A;&#x4F7F;&#x7528;&#x7684;&#x53C2;&#x6570;&#x5219;&#x629B;&#x9519;&#x3002;</td>
</tr>
<tr>
<td><del><code>--out</code></del></td>
<td><code>string</code></td>
<td></td>
<td>&#x5F03;&#x7528;&#x3002;&#x4F7F;&#x7528; <code>--outFile</code> &#x4EE3;&#x66FF;&#x3002;</td>
</tr>
<tr>
<td><code>--outDir</code></td>
<td><code>string</code></td>
<td></td>
<td>&#x91CD;&#x5B9A;&#x5411;&#x8F93;&#x51FA;&#x76EE;&#x5F55;&#x3002;</td>
</tr>
<tr>
<td><code>--outFile</code></td>
<td><code>string</code></td>
<td></td>
<td>&#x5C06;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x5408;&#x5E76;&#x4E3A;&#x4E00;&#x4E2A;&#x6587;&#x4EF6;&#x3002;&#x5408;&#x5E76;&#x7684;&#x987A;&#x5E8F;&#x662F;&#x6839;&#x636E;&#x4F20;&#x5165;&#x7F16;&#x8BD1;&#x5668;&#x7684;&#x6587;&#x4EF6;&#x987A;&#x5E8F;&#x548C;<code>///&lt;reference``&gt;</code>&#x548C;<code>import</code>&#x7684;&#x6587;&#x4EF6;&#x987A;&#x5E8F;&#x51B3;&#x5B9A;&#x7684;&#x3002;&#x67E5;&#x770B;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#x987A;&#x5E8F;&#x6587;&#x4EF6;&#x4E86;&#x89E3;&#x8BE6;&#x60C5;&#x3002;</td>
</tr>
<tr>
<td><code>paths</code><sup>[2]</sup></td>
<td><code>Object</code></td>
<td></td>
<td>&#x6A21;&#x5757;&#x540D;&#x5230;&#x57FA;&#x4E8E;<code>baseUrl</code>&#x7684;&#x8DEF;&#x5F84;&#x6620;&#x5C04;&#x7684;&#x5217;&#x8868;&#x3002;&#x67E5;&#x770B;<a href="Module%20Resolution.md#path-mapping">&#x6A21;&#x5757;&#x89E3;&#x6790;&#x6587;&#x6863;</a>&#x4E86;&#x89E3;&#x8BE6;&#x60C5;&#x3002;</td>
</tr>
<tr>
<td><code>--preserveConstEnums</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4FDD;&#x7559;<code>const</code>&#x548C;<code>enum</code>&#x58F0;&#x660E;&#x3002;&#x67E5;&#x770B;<a href="https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#94-constant-enum-declarations" target="_blank">const enums documentation</a>&#x4E86;&#x89E3;&#x8BE6;&#x60C5;&#x3002;</td>
</tr>
<tr>
<td><code>--preserveSymlinks</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x628A;&#x7B26;&#x53F7;&#x94FE;&#x63A5;&#x89E3;&#x6790;&#x4E3A;&#x5176;&#x771F;&#x5B9E;&#x8DEF;&#x5F84;&#xFF1B;&#x5C06;&#x7B26;&#x53F7;&#x94FE;&#x63A5;&#x6587;&#x4EF6;&#x89C6;&#x4E3A;&#x771F;&#x6B63;&#x7684;&#x6587;&#x4EF6;&#x3002;</td>
</tr>
<tr>
<td><code>--preserveWatchOutput</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4FDD;&#x7559;watch&#x6A21;&#x5F0F;&#x4E0B;&#x8FC7;&#x65F6;&#x7684;&#x63A7;&#x5236;&#x53F0;&#x8F93;&#x51FA;&#x3002;</td>
</tr>
<tr>
<td><code>--pretty</code><sup>[1]</sup></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x7ED9;&#x9519;&#x8BEF;&#x548C;&#x6D88;&#x606F;&#x8BBE;&#x7F6E;&#x6837;&#x5F0F;&#xFF0C;&#x4F7F;&#x7528;&#x989C;&#x8272;&#x548C;&#x4E0A;&#x4E0B;&#x6587;&#x3002;</td>
</tr>
<tr>
<td><code>--project</code><br><code>-p</code></td>
<td><code>string</code></td>
<td></td>
<td>&#x7F16;&#x8BD1;&#x6307;&#x5B9A;&#x76EE;&#x5F55;&#x4E0B;&#x7684;&#x9879;&#x76EE;&#x3002;&#x8FD9;&#x4E2A;&#x76EE;&#x5F55;&#x5E94;&#x8BE5;&#x5305;&#x542B;&#x4E00;&#x4E2A;<code>tsconfig.json</code>&#x6587;&#x4EF6;&#x6765;&#x7BA1;&#x7406;&#x7F16;&#x8BD1;&#x3002;&#x67E5;&#x770B;<a href="tsconfig.json.html">tsconfig.json</a>&#x6587;&#x6863;&#x4E86;&#x89E3;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--reactNamespace</code></td>
<td><code>string</code></td>
<td><code>&quot;React&quot;</code></td>
<td>&#x5F53;&#x76EE;&#x6807;&#x4E3A;&#x751F;&#x6210;<code>&quot;react&quot;</code> JSX&#x65F6;&#xFF0C;&#x6307;&#x5B9A;<code>createElement</code>&#x548C;<code>__spread</code>&#x7684;&#x8C03;&#x7528;&#x5BF9;&#x8C61;</td>
</tr>
<tr>
<td><code>--removeComments</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5220;&#x9664;&#x6240;&#x6709;&#x6CE8;&#x91CA;&#xFF0C;&#x9664;&#x4E86;&#x4EE5;<code>/!*</code>&#x5F00;&#x5934;&#x7684;&#x7248;&#x6743;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--rootDir</code></td>
<td><code>string</code></td>
<td><em>(common root directory is computed from the list of input files)</em></td>
<td>&#x4EC5;&#x7528;&#x6765;&#x63A7;&#x5236;&#x8F93;&#x51FA;&#x7684;&#x76EE;&#x5F55;&#x7ED3;&#x6784;<code>--outDir</code>&#x3002;</td>
</tr>
<tr>
<td><code>rootDirs</code><sup>[2]</sup></td>
<td><code>string[]</code></td>
<td></td>
<td><i>&#x6839;&#xFF08;root&#xFF09;</i>&#x6587;&#x4EF6;&#x5939;&#x5217;&#x8868;&#xFF0C;&#x8868;&#x793A;&#x8FD0;&#x884C;&#x65F6;&#x7EC4;&#x5408;&#x5DE5;&#x7A0B;&#x7ED3;&#x6784;&#x7684;&#x5185;&#x5BB9;&#x3002;&#x67E5;&#x770B;<a href="Module%20Resolution.md#virtual-directories-with-rootdirs">&#x6A21;&#x5757;&#x89E3;&#x6790;&#x6587;&#x6863;</a>&#x4E86;&#x89E3;&#x8BE6;&#x60C5;&#x3002;</td>
</tr>
<tr>
<td><code>--skipDefaultLibCheck</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5FFD;&#x7565;<a href="Triple-Slash%20Directives.md#-reference-no-default-libtrue">&#x5E93;&#x7684;&#x9ED8;&#x8BA4;&#x58F0;&#x660E;&#x6587;&#x4EF6;</a>&#x7684;&#x7C7B;&#x578B;&#x68C0;&#x67E5;&#x3002;</td>
</tr>
<tr>
<td><code>--skipLibCheck</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5FFD;&#x7565;&#x6240;&#x6709;&#x7684;&#x58F0;&#x660E;&#x6587;&#x4EF6;&#xFF08;<code>*.d.ts</code>&#xFF09;&#x7684;&#x7C7B;&#x578B;&#x68C0;&#x67E5;&#x3002;</td>
</tr>
<tr>
<td><code>--sourceMap</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x751F;&#x6210;&#x76F8;&#x5E94;&#x7684;<code>.map</code>&#x6587;&#x4EF6;&#x3002;</td>
</tr>
<tr>
<td><code>--sourceRoot</code></td>
<td><code>string</code></td>
<td></td>
<td>&#x6307;&#x5B9A;TypeScript&#x6E90;&#x6587;&#x4EF6;&#x7684;&#x8DEF;&#x5F84;&#xFF0C;&#x4EE5;&#x4FBF;&#x8C03;&#x8BD5;&#x5668;&#x5B9A;&#x4F4D;&#x3002;&#x5F53;TypeScript&#x6587;&#x4EF6;&#x7684;&#x4F4D;&#x7F6E;&#x662F;&#x5728;&#x8FD0;&#x884C;&#x65F6;&#x6307;&#x5B9A;&#x65F6;&#x4F7F;&#x7528;&#x6B64;&#x6807;&#x8BB0;&#x3002;&#x8DEF;&#x5F84;&#x4FE1;&#x606F;&#x4F1A;&#x88AB;&#x52A0;&#x5230;<code>sourceMap</code>&#x91CC;&#x3002;</td>
</tr>
<tr>
<td><code>--strict</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x542F;&#x7528;&#x6240;&#x6709;&#x4E25;&#x683C;&#x7C7B;&#x578B;&#x68C0;&#x67E5;&#x9009;&#x9879;&#x3002;<br>&#x542F;&#x7528;<code>--strict</code>&#x76F8;&#x5F53;&#x4E8E;&#x542F;&#x7528; <code>--noImplicitAny</code>, <code>--noImplicitThis</code>, <code>--alwaysStrict</code>&#xFF0C;<code>--strictNullChecks</code>&#x548C;<code>--strictFunctionTypes</code>&#x3002;</td>
</tr>
<tr>
<td><code>--strictFunctionTypes</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x7981;&#x7528;&#x51FD;&#x6570;&#x53C2;&#x6570;&#x53CC;&#x5411;&#x534F;&#x53D8;&#x68C0;&#x67E5;&#x3002;</td>
</tr>
<tr>
<td><code>--strictPropertyInitialization</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x786E;&#x4FDD;&#x7C7B;&#x7684;&#x975E;<code>undefined</code>&#x5C5E;&#x6027;&#x5DF2;&#x7ECF;&#x5728;&#x6784;&#x9020;&#x51FD;&#x6570;&#x91CC;&#x521D;&#x59CB;&#x5316;&#x3002;&#x82E5;&#x8981;&#x4EE4;&#x6B64;&#x9009;&#x9879;&#x751F;&#x6548;&#xFF0C;&#x9700;&#x8981;&#x540C;&#x65F6;&#x542F;&#x7528;<code>--strictNullChecks</code>&#x3002;</td>
</tr>
<tr>
<td><code>--strictNullChecks</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x5728;&#x4E25;&#x683C;&#x7684;<code>null</code>&#x68C0;&#x67E5;&#x6A21;&#x5F0F;&#x4E0B;&#xFF0C;<code>null</code>&#x548C;<code>undefined</code>&#x503C;&#x4E0D;&#x5305;&#x542B;&#x5728;&#x4EFB;&#x4F55;&#x7C7B;&#x578B;&#x91CC;&#xFF0C;&#x53EA;&#x5141;&#x8BB8;&#x7528;&#x5B83;&#x4EEC;&#x81EA;&#x5DF1;&#x548C;<code>any</code>&#x6765;&#x8D4B;&#x503C;&#xFF08;&#x6709;&#x4E2A;&#x4F8B;&#x5916;&#xFF0C;<code>undefined</code>&#x53EF;&#x4EE5;&#x8D4B;&#x503C;&#x5230;<code>void</code>&#xFF09;&#x3002;</td>
</tr>
<tr>
<td><code>--stripInternal</code><sup>[1]</sup></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x4E0D;&#x5BF9;&#x5177;&#x6709;<code>/** @internal */</code> JSDoc&#x6CE8;&#x89E3;&#x7684;&#x4EE3;&#x7801;&#x751F;&#x6210;&#x4EE3;&#x7801;&#x3002;</td>
</tr>
<tr>
<td><code>--suppressExcessPropertyErrors</code><sup>[1]</sup></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x963B;&#x6B62;&#x5BF9;&#x5BF9;&#x8C61;&#x5B57;&#x9762;&#x91CF;&#x7684;&#x989D;&#x5916;&#x5C5E;&#x6027;&#x68C0;&#x67E5;&#x3002;</td>
</tr>
<tr>
<td><code>--suppressImplicitAnyIndexErrors</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x963B;&#x6B62;<code>--noImplicitAny</code>&#x5BF9;&#x7F3A;&#x5C11;&#x7D22;&#x5F15;&#x7B7E;&#x540D;&#x7684;&#x7D22;&#x5F15;&#x5BF9;&#x8C61;&#x62A5;&#x9519;&#x3002;&#x67E5;&#x770B;<a href="https://github.com/Microsoft/TypeScript/issues/1232#issuecomment-64510362" target="_blank">issue #1232</a>&#x4E86;&#x89E3;&#x8BE6;&#x60C5;&#x3002;</td>
</tr>
<tr>
<td><code>--target</code><br><code>-t</code></td>
<td><code>string</code></td>
<td><code>&quot;ES3&quot;</code></td>
<td>&#x6307;&#x5B9A;ECMAScript&#x76EE;&#x6807;&#x7248;&#x672C;<code>&quot;ES3&quot;</code>&#xFF08;&#x9ED8;&#x8BA4;&#xFF09;&#xFF0C;<code>&quot;ES5&quot;</code>&#xFF0C;<code>&quot;ES6&quot;</code>/<code>&quot;ES2015&quot;</code>&#xFF0C;<code>&quot;ES2016&quot;</code>&#xFF0C;<code>&quot;ES2017&quot;</code>&#x6216;<code>&quot;ESNext&quot;</code>&#x3002;<br><br> &#x6CE8;&#x610F;&#xFF1A;<code>&quot;ESNext&quot;</code>&#x6700;&#x65B0;&#x7684;&#x751F;&#x6210;&#x76EE;&#x6807;&#x5217;&#x8868;&#x4E3A;<a href="https://github.com/tc39/proposals" target="_blank">ES proposed features</a></td>
</tr>
<tr>
<td><code>--traceResolution</code></td>
<td><code>boolean</code></td>
<td><code>false</code></td>
<td>&#x751F;&#x6210;&#x6A21;&#x5757;&#x89E3;&#x6790;&#x65E5;&#x5FD7;&#x4FE1;&#x606F;</td>
</tr>
<tr>
<td><code>--types</code></td>
<td><code>string[]</code></td>
<td></td>
<td>&#x8981;&#x5305;&#x542B;&#x7684;&#x7C7B;&#x578B;&#x58F0;&#x660E;&#x6587;&#x4EF6;&#x540D;&#x5217;&#x8868;&#x3002;&#x67E5;&#x770B;<a href="tsconfig.json.html#types-typeroots-and-types">@types&#xFF0C;--typeRoots&#x548C;--types</a>&#x7AE0;&#x8282;&#x4E86;&#x89E3;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--typeRoots</code></td>
<td><code>string[]</code></td>
<td></td>
<td>&#x8981;&#x5305;&#x542B;&#x7684;&#x7C7B;&#x578B;&#x58F0;&#x660E;&#x6587;&#x4EF6;&#x8DEF;&#x5F84;&#x5217;&#x8868;&#x3002;&#x67E5;&#x770B;<a href="tsconfig.json.html#types-typeroots-and-types">@types&#xFF0C;--typeRoots&#x548C;--types</a>&#x7AE0;&#x8282;&#x4E86;&#x89E3;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#x3002;</td>
</tr>
<tr>
<td><code>--version</code><br><code>-v</code></td>
<td></td>
<td></td>
<td>&#x6253;&#x5370;&#x7F16;&#x8BD1;&#x5668;&#x7248;&#x672C;&#x53F7;&#x3002;</td>
</tr>
<tr>
<td><code>--watch</code><br><code>-w</code></td>
<td></td>
<td></td>
<td>&#x5728;&#x76D1;&#x89C6;&#x6A21;&#x5F0F;&#x4E0B;&#x8FD0;&#x884C;&#x7F16;&#x8BD1;&#x5668;&#x3002;&#x4F1A;&#x76D1;&#x89C6;&#x8F93;&#x51FA;&#x6587;&#x4EF6;&#xFF0C;&#x5728;&#x5B83;&#x4EEC;&#x6539;&#x53D8;&#x65F6;&#x91CD;&#x65B0;&#x7F16;&#x8BD1;&#x3002;&#x76D1;&#x89C6;&#x6587;&#x4EF6;&#x548C;&#x76EE;&#x5F55;&#x7684;&#x5177;&#x4F53;&#x5B9E;&#x73B0;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x73AF;&#x5883;&#x53D8;&#x91CF;&#x8FDB;&#x884C;&#x914D;&#x7F6E;&#x3002;&#x8BE6;&#x60C5;&#x8BF7;&#x770B;<a href="Configuring%20Watch.md">&#x914D;&#x7F6E; Watch</a>&#x3002;</td>
</tr>
</tbody>
</table>
<ul>
<li><sup>[1]</sup> &#x8FD9;&#x4E9B;&#x9009;&#x9879;&#x662F;&#x8BD5;&#x9A8C;&#x6027;&#x7684;&#x3002;</li>
<li><sup>[2]</sup> &#x8FD9;&#x4E9B;&#x9009;&#x9879;&#x53EA;&#x80FD;&#x5728;<code>tsconfig.json</code>&#x91CC;&#x4F7F;&#x7528;&#xFF0C;&#x4E0D;&#x80FD;&#x5728;&#x547D;&#x4EE4;&#x884C;&#x4F7F;&#x7528;&#x3002;</li>
</ul>
<h2 id="&#x76F8;&#x5173;&#x4FE1;&#x606F;">&#x76F8;&#x5173;&#x4FE1;&#x606F;</h2>
<ul>
<li>&#x5728;<a href="tsconfig.json.html"><code>tsconfig.json</code></a>&#x6587;&#x4EF6;&#x91CC;&#x8BBE;&#x7F6E;&#x7F16;&#x8BD1;&#x5668;&#x9009;&#x9879;&#x3002;</li>
<li>&#x5728;<a href="Compiler%20Options%20in%20MSBuild.md">MSBuild&#x5DE5;&#x7A0B;</a>&#x91CC;&#x8BBE;&#x7F6E;&#x7F16;&#x8BD1;&#x5668;&#x9009;&#x9879;&#x3002;</li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="Typings for NPM Packages.html" class="navigation navigation-prev " aria-label="Previous page: NPM包的类型">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Configuring Watch.html" class="navigation navigation-next " aria-label="Next page: 配置 Watch">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"编译选项","level":"1.5.4","depth":2,"next":{"title":"配置 Watch","level":"1.5.5","depth":2,"path":"doc/handbook/Configuring Watch.md","ref":"./doc/handbook/Configuring Watch.md","articles":[]},"previous":{"title":"NPM包的类型","level":"1.5.3","depth":2,"path":"doc/handbook/Typings for NPM Packages.md","ref":"./doc/handbook/Typings for NPM Packages.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Patrick Zhong","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"preface.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"TypeScript Handbook","language":"zh-hans","gitbook":">3.0.0","description":"Translation of official TypeScript Handbook"},"file":{"path":"doc/handbook/Compiler Options.md","mtime":"2018-10-13T09:48:54.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-10-13T09:57:42.904Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

